<?php

namespace IMT\UserBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;

class PersonFormType extends AbstractType
{
    
    public function buildForm(FormBuilder $builder, array $options)
    {
    	
    	$builder
    		->add('name')
    		->add('firstname')
    		->add('civility', 'choice', array(
    			//'multiple' => true,
    			'expanded' => true,
    			'choices' => array(
            		'Mr' => 'Mr', 
            		'Mme' => 'Mme',
            		'Mlle' => 'Mlle'
    			)
    		))
    	;
    }
    
    public function getDefaultOptions(array $options)
    {
    	return array(
    			'data_class' => 'IMT\UserBundle\Entity\Person',
    	);
    }

    public function getName()
    {
        return 'person_form';
    }
}
